package com.meta.platform.login.plus.wechat.http.req;

import com.meta.platform.login.plus.common.annotations.WeChatField;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * jscode换取临时code请求
 *
 * @author pengjianfeng
 * @version 1.0
 * @date 2021/1/22 9:09 上午
 */
@Data
@Accessors(chain = true)
public class JsCode2SessionRequest extends WeChatBaseRequest {
    
    private static final long serialVersionUID = 8884359350485689555L;
    
    private static final String DEFAULT_AUTHORIZATION_CODE = "authorization_code";
    
    /**
     * 小程序 appId
     */
    @WeChatField("appid")
    private String appId;
    
    /**
     * 小程序 appSecret
     */
    @WeChatField("secret")
    private String appSecret;
    
    /**
     * 登录时获取的 code
     */
    @WeChatField("js_code")
    private String jsCode;
    
    /**
     * 授权类型，此处只需填写 authorization_code
     */
    
    @WeChatField("grant_type")
    private String grantType = DEFAULT_AUTHORIZATION_CODE;
}
